package com.zhyl.demo.mapper;

import com.zhyl.demo.entity.SendMessage;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;

/**
 * @author yang3
 */
@Mapper
public interface SendMessageMapper {
    /**
     * 发送消息供对应人接收
     * @param sendMessage
     * @return
     */
    Integer sendMessage(SendMessage sendMessage);

    /**
     * 读取全部消息
     * @param userId
     * @return
     */
    ArrayList<SendMessage> getMsgData(int userId);

    /**
     * 读取未读消息
     * @param id
     * @return
     */
    Integer imRead(int id);
}
